import Cookies from 'js-cookie'
import website from '@/config/website'
import {getStore} from "@/utils/store";
const Authorization = website.Authorization
let inFifteenMinutes = new Date(new Date().getTime() + website.tokenTime * 1000);

export function getToken () {
  // console.log("获取token", Cookies.get(Authorization))

  return Cookies.get(Authorization)
}

export function setToken (token) {

  // console.log("设置token",Authorization,token)
  return Cookies.set(Authorization, token, { expires: inFifteenMinutes })
}


export function removeToken () {
  return Cookies.remove(Authorization)
}